﻿using System.Threading.Tasks;
using Xproject.Framework.Core;
using Xproject.Framework.Core.DataContext;
using Xproject.Framework.Core.Repositories;
using Model.WXshopBuiness;
using Repository.WXshopBuiness;
using Xproject.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Model.Const;
using Model.Util;
using Repository.Util;
using Model.Util.Enum;

namespace Services.WXshopBuiness
{
   public  class SalesServices:Service
    {
        IRepositoryAsync<WXProduct> m_WXProductRepository;
      
        public SalesServices(IDataContextAsync dataContext) : base(dataContext)
        {
            m_WXProductRepository = m_UnitOfWork.RepositoryAsync<WXProduct>();          
        }

        public List<WXProduct> GetMySalesBrandList(string site,string zxUserId)
        {
            //基础版本，不分产品归谁，
            if (Cache_Product.WXProduct == null)
            {
                Cache_Product.WXProduct = m_WXProductRepository.GetAllWXProducts(site);
            }
            return Cache_Product.WXProduct;
        }

    }
}
